package com.lovely602.boot.bootdemo.filter;

/**
 * @author BinLee
 */
public class TokenContextHolder {

  private static final ThreadLocal<TokenContext> HOLDER = new ThreadLocal<>();

  public static TokenContext getTokenContext() {
    return HOLDER.get();
  }

  public static void setTokenContext(TokenContext context) {
    HOLDER.set(context);
  }

  public static void clear() {
    HOLDER.remove();
  }

}
